package com.rockcent.mall.lib.repository;

import com.rockcent.common.domain.enumclass.Whether;
import com.rockcent.mall.lib.domain.MerchantCouponProducts;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by DK on 16/10/22.
 */
@Repository
public interface MerchantCouponProductsRepository extends JpaRepository<MerchantCouponProducts, Long>, JpaSpecificationExecutor, MerchantCouponProductsCustom {

    List<MerchantCouponProducts> findByCouponId(Long couponId);

    List<MerchantCouponProducts> findByCouponIdAndIsDelete(Long id, Whether isDelete);
}
